﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Enter.Common.validcode
{
    public class RandNum
    {
        public static string GetRandNum(int __num)
        {
            char[] chArray = new char[] { 
                 '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', 
                'g', 'h', 'j', 'k', 'l', 'm', 'n', 'p', 'q', 'r', 's', 't', 'u', 'v', 
                'w', 'x', 'y', 'z'
             };
            string str = "";
            Random random = new Random(DateTime.Now.Millisecond);
            for (int i = 0; i < __num; i++)
            {
                str = str + chArray[random.Next(0, chArray.Length)].ToString();
            }
            return str;
        }
    }
}
